/*
 * Digital Audio Mobile - A multi track studio for Windows Mobile
 * Copyright (C) 2008 David Olsson
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

#if !defined(__AUDIOBUFFER_H__)
#define __AUDIOBUFFER_H__

class AudioBuffer {
public:
    AudioBuffer(unsigned int numSamples, unsigned int numChannels, unsigned int samplesPerSecond, unsigned int bytesPerSample) throw();
    ~AudioBuffer();

    unsigned int numSamples() const throw();
    unsigned int numChannels() const throw();
    unsigned int samplesPerSecond() const throw();
    unsigned int bytesPerSample() const throw();

    const void *buffer() const throw();
    void *buffer() throw();
    unsigned int bufferSize() const throw();

    void superPosition(const AudioBuffer &rhs) throw();
private:
    void superPosition1M8On1M8(const AudioBuffer &rhs) throw();

    unsigned int m_numSamples;
    unsigned int m_numChannels;
    unsigned int m_samplesPerSecond;
    unsigned int m_bytesPerSample;
    unsigned char *m_buffer;
};

#endif
